<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <link href="css/SYSFrame.css" rel="stylesheet" type="text/css" />
    <link href="font/iconfont.css" rel="stylesheet" type="text/css" />
    <link href="css/module.css" rel="stylesheet" type="text/css" />
    <link href="css/pages.css" rel="stylesheet" type="text/css" />
    <title>订单详细</title>
    <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="js/jquery.cookie.js" type="text/javascript"></script>
    <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="js/HUpages.js" type="text/javascript"></script>
    <script src="js/template.js" type="text/javascript"></script>
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js" type="text/javascript"></script>
    <script src="js/css3-mediaqueries.js"  type="text/javascript"></script>
    <![endif]-->
</head>

<body id="pagestyle" class="backgroundf0">
<div class="border backgroundff margin10">
    <button type="button" onclick="javascript:history.back(-1);" class="btn button_btn btn-danger" onclick=""><i class="iconfont">&#xe6c3</i>&nbsp;返回上一步</button>
</div>
<div class="box-module">
    <div class="box-title">订单详细</div>
    <div class="box-content padding15" id="order_details">

    </div>
</div>
</body>
</html>
<script>
    $(function() {
        $("#pagestyle").Hupage({
            scrollbar: function(e) {
                e.niceScroll({
                    cursorcolor: "#dddddd",
                    cursoropacitymax: 1,
                    touchbehavior: false,
                    cursorwidth: "3px",
                    cursorborder: "0",
                    cursorborderradius: "3px",
                });
            },
            expand: function(thisBox, settings) {
                settings.scrollbar(thisBox); //设置当前页滚动样式
            }
        });
    });
    (function($) {
        $.getUrlParam = function(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r != null) return unescape(r[2]);
            return null;
        }
    })(jQuery); //获取设置url

    var detailsid = $.getUrlParam('detailsid');//获取其中的参数值
    //编辑数据
    var details = function(callback) {
        $.ajax({
            url: "json/products.json",
            type: "GET",
            dataType: 'json',
            success: function(ret) {
                typeof callback == 'function' && callback(ret);
            },
        });
    };
    details(function(listArr){
        $.ajax({
            url: "html/order/details.html",
            type: "GET",
            dataType: "html",
            success: function(result) {
                $('body').append("<script id='detailshtml' type='text/html'>"+result+"</script\>");
                var detailshtml = $('#order_details');
                var html = template('detailshtml', {
                    id:detailsid,
                    order: listArr.order,
                    address:listArr.address,
                    status: listArr.orderstatus
                });
                detailshtml.append(html);
                $("#detailshtml").remove();//加载完毕删除模版路径
            }
        });
    });
</script>
<script src="js/common.js" type="text/javascript"></script>
